import {
  wxRequest
} from '@/utils/wxRequest';
let env = "-test" //-dev 或者 -test
// const apiMall = 'https://t.api.weitao.kr/';
const apiMall = 'https://api.weitao.kr/';//正式
// const apiZall = 'https://t.weitao.kr/';
const apiZall = 'https://weitao.kr/';//正式
const getcode2Session = (params) => wxRequest(params, apiMall + 'wechat/mini/code2Session');//获取session
const getCaptcha = (params) => wxRequest(params, apiMall + 'getCaptcha');//获取验证码
const vipBind = (params) => wxRequest(params, apiZall + 'api/mini/vipBind');//绑定手机号
const orderQuery = (params) => wxRequest(params, apiMall + 'order/query');//获取订单
const remove = (params) => wxRequest(params, apiMall + 'order/v3/remove');//获取订单
const vipBindMini = (params) => wxRequest(params, apiZall + 'api/mini/vipBindMini');//绑定微信手机号
const vipInfo = (params) => wxRequest(params, apiZall + 'api/mini/vipInfo');//绑定微信手机号
const editVip = (params) => wxRequest(params, apiZall + 'api/mini/editVip');//绑定微信手机号
const homePage = (params) => wxRequest(params, apiZall + 'api/mini/homePage');//获取首页
const collectMaterial = (params) => wxRequest(params, apiZall + 'api/mini/collectMaterial');//点赞和收藏
const cancelCollectMaterial = (params) => wxRequest(params, apiZall + 'api/mini/cancelCollectMaterial');//取消点赞和收藏
const favorites = (params) => wxRequest(params, apiZall + 'api/mini/favorites');//我的点赞和收藏
const materialDetail = (params) => wxRequest(params, apiZall + 'api/mini/materialDetail');//素材详情
const orderMod = (params) => wxRequest(params, apiMall + '/order/v3/mod');//修改地址
const createOrder = (params) => wxRequest(params, apiZall + 'api/mini/createOrder');//创建订单
const unifiedOrder = (params) => wxRequest(params, apiMall + 'weixinOrder/unifiedOrder');//支付
const queryCouponByOrderId = (params) => wxRequest(params, apiMall + 'coupon/queryCouponByOrderId');//获取优惠券列表
const modExpress = (params) => wxRequest(params, apiMall + 'order/v2/modExpress');//使用优惠券
const calculationOrder = (params) => wxRequest(params, apiMall + 'coupon/calculationOrder');//使用优惠券算金额
const activityList = (params) => wxRequest(params, apiZall + 'api/mini/activityList');//活动列表
const joinRecordsByVip = (params) => wxRequest(params, apiZall + 'api/management/activity/mob/joinRecordsByVip');//参团记录
const infoByVip = (params) => wxRequest(params, apiZall + 'api/management/activity/mob/infoByVip');//获取拼团活动详情
const recordInfoByOrder = (params) => wxRequest(params, apiZall + 'api/management/activity/mob/recordInfoByOrder');//获取参团订单详情
const vipQueryList = (params) => wxRequest(params, apiMall + 'vip/coupon/queryList');//获取参团订单详情
export default {
  getcode2Session,
  getCaptcha,
  vipBind,
  orderQuery,
  vipBindMini,
  vipInfo,
  editVip,
  homePage,
  collectMaterial,
  cancelCollectMaterial,
  materialDetail,
  orderMod,
  favorites,
  createOrder,
  remove,
  unifiedOrder,
  queryCouponByOrderId,
  modExpress,
  calculationOrder,
  activityList,
  joinRecordsByVip,
  infoByVip,
  recordInfoByOrder,
  vipQueryList
}
